﻿namespace NMA.Domain.Shared.Specification
{
    public class NotSpecification<T> : AbstractSpecification<T>
    {
        private readonly ISpecification<T> _operator;

        public NotSpecification(ISpecification<T> op)
        {
            this._operator = op;
        }

        public override bool IsSatisfiedBy(T t)
        {
            return !_operator.IsSatisfiedBy(t);
        }
    }
}
